<form action="entities/edit/{$entity->id}/" method="post" enctype="multipart/form-data">

  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">×</button>
    <h3>{$entity->singular|capitalize} model's Edit</h3>
  </div>

  <div class="modal-body">

    <div class="tabbable"> <!-- Only required for left/right tabs -->
      <ul class="nav nav-tabs">
        <li class="active"><a href="#basic" data-toggle="tab">Basic Info</a></li>
        <li><a href="#attributes" data-toggle="tab">Attributes</a></li>
      </ul>
      <div class="tab-content">
        
        <!-- BASIC TAB -->
        <section class="tab-pane active" id="basic">
          <input type="hidden" name="id" value="{$entity->id}">

          <div class="control-group">
            <label for="plural">Plural Name *</label>
            <input class="input-xlarge" id="plural" name="plural" type="text" value="{$entity->plural}" required="required" />
          </div>

          <div class="control-group">
            <label for="singular">Singular Name *</label>
            <input class="input-xlarge" id="singular" name="singular" type="text" value="{$entity->singular}" required="required" />
          </div>

          <div class="control-group">
            <label for="description">Description</label>
            <textarea  id="description" name="description" cols="45" rows="5" class="input-xlarge">{$entity->description}</textarea>
          </div>
        </section>
        <!-- basic tab -->

        <!-- ATTRIBUTES TAB -->
        <section class="tab-pane" id="attributes">
          <div>
            <a class="btn" id="create_attribute" href="#">Add an Attribute</a>
          </div>

          <!-- Attributes vertical tabs -->
          <div class="tabbable tabs-left attributes-tab">
            <ul class="nav nav-tabs"></ul>
            <div class="tab-content"></div>
          </div>
        </section>
        <!-- attributes tab -->

      </div>
      <!-- tab-content -->
    </div>
    <!-- tabbable -->

  </div>
  <!-- .modal-body -->

  <div class="modal-footer">
    <button type="submit" class="btn btn-primary">Save Entity</button>
  </div>

</form>

{include file='entity_edit.js.html'}

<script>
$(function () {
   var activeTab = $('[href=#' + '{$active_tab}' + ']');
   activeTab && activeTab.tab('show');
});
</script>